Skip to content

build: add asan memory check ci workflow#147

Merged
tomghuang merged 1 commit intomasterfrom
build-add-asan-ci-workflow
Jun 22, 2025
Merged

build: add asan memory check ci workflow#147
tomghuang merged 1 commit intomasterfrom
build-add-asan-ci-workflow

Conversation

@tomghuang
Copy link
Copy Markdown
Contributor

This commit adds a GitHub Actions workflow (asan.yml) to detect memory issues in the argtable3 project using AddressSanitizer (ASan). The workflow triggers on push and pull_request events targeting the main branch. It builds the project with ASan and runs tests to identify memory errors, including leaks and invalid accesses.

Purpose:

  • Ensure memory safety by detecting issues during CI.
  • Improve code quality and reliability with automated checks.

@tomghuang tomghuang force-pushed the build-add-asan-ci-workflow branch 2 times, most recently from 22c84f4 to e496bc9 Compare June 22, 2025 00:19
This commit adds a GitHub Actions workflow (`asan.yml`) to detect
memory issues in the `argtable3` project using AddressSanitizer
(ASan). The workflow triggers on `push` and `pull_request` events
targeting the `main` branch. It builds the project with ASan and
runs tests to identify memory errors, including leaks and invalid
accesses.

Purpose:
- Ensure memory safety by detecting issues during CI.
- Improve code quality and reliability with automated checks.
@tomghuang tomghuang force-pushed the build-add-asan-ci-workflow branch from e496bc9 to 493b395 Compare June 22, 2025 00:25
@tomghuang tomghuang requested a review from Copilot June 22, 2025 00:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new GitHub Actions workflow to detect memory issues using AddressSanitizer (ASan).

  • Introduces .github/workflows/asan.yml to build the project with ASan and run tests under memory checks.
  • Triggers on pushes and pull requests to the default branch.
  • Installs needed dependencies, configures ASan build flags, and reports test failures.
Comments suppressed due to low confidence (3)

.github/workflows/asan.yml:6

  • The workflow filters pushes on master, but the repository uses main as the default branch. Update to branches: [ main ] to ensure CI runs as intended.
    branches: [ master ]

.github/workflows/asan.yml:27

  • Only C flags are instrumented for ASan. To catch memory issues in C++ code, also set CMAKE_CXX_FLAGS with the same sanitizer options.
        cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer" ..

.github/workflows/asan.yml:7

  • [nitpick] Pin the pull_request trigger to the default branch (e.g., branches: [ main ]) to avoid running ASan checks on unintended branches.
  pull_request:

@tomghuang tomghuang merged commit 60c8e93 into master Jun 22, 2025
11 checks passed
@tomghuang tomghuang deleted the build-add-asan-ci-workflow branch June 22, 2025 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants